package com.bckj.fastboot.paid.biz.infrastructure.sdk.wechatpay;

import com.bckj.fastboot.paid.biz.infrastructure.sdk.PayConfigWrapper;
import com.bckj.fastboot.paid.biz.infrastructure.sdk.PayServiceWrapper;
import com.wechat.pay.java.core.Config;
import com.wechat.pay.java.service.refund.RefundService;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class WechatRefundServiceWrapper extends PayServiceWrapper {

    public WechatRefundServiceWrapper(String appId) {
        super(appId);
    }

    @Override
    protected void init() {
        PayConfigWrapper wrapper = WechatPayConfigProvider.get(appId);
        service = new RefundService.Builder().config((Config) wrapper.getConfig()).build();
    }
}
